package jok.list;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class CollectionDemo {

	public static void main(String[] args) {

		Collection coll = new ArrayList();

		System.out.println(coll.isEmpty());

		coll.add("张三");
		coll.add("李四");
		coll.add("王五");
		coll.add("赵六");

		System.out.println(coll.contains("赵六"));

		coll.remove("赵六");

		System.out.println(coll.contains("赵六"));

		Iterator iter = coll.iterator();
		while (iter.hasNext()) {
			String str = (String) iter.next();
			System.out.println(str);
		}
	}
}
